1. Field of Invention
The present invention relates generally to the field of database query processing. More specifically, the present invention is related to efficient query processing with materialized views and heuristics operating on the materialized views.
2. Discussion of Prior Art
Materialized views (MVs, also known as materialized query tables (MQTs), or summary tables, etc.) are effective in improving the performance of decision support/reporting queries over very large databases by precomputing and materializing the result of queries into tables and automatically using them for answering queries. As users create many MVs to improve the performance of a variety of queries, some queries may potentially match multiple MVs. The matching algorithm for queries and MVs is computationally expensive. Such matching algorithms select an MV among many MVs matching a query (with specific attention devoted to avoiding unnecessary matching).
The traditional approaches include one of the following:                1) find the first match and then stop searching for other alternatives. This approach may result in missing better MVs.        2) find all MVs that match, and then select one using various criteria. This approach may suffer excessive cost for matching, since—the matching logic is quite complex and computationally expensive.        3) match based on the query and MV characteristics, such as matching aggregate queries with MVs with aggregates first, etc. This approach may still require many extra matchings.        
The U.S. patent to Ross et al. (U.S. Pat. No. 6,026,390) provides for a method of incrementally maintaining a first materialized view of data in a database, by means of an additional materialized view. These additional materialized views are introduced to reduce the cost of maintaining the target materialized view for base table updates. The method of Ross et al. aids in maintaining views; in particular, the method allows for incrementally maintaining materialized views.
The U.S. patent to Agrawal et al. (U.S. Pat. No. 6,513,029) discloses a method used to recommend a set of materialized views and their given indexes for a given database workload. Candidate materialized views are obtained by first determining subsets of tables referenced by queries, and then finding interesting table subsets. Next, interesting table subsets are considered on a per query basis to determine which are syntactically relevant to a query. Materialized views that are likely to be used by queries are then generated.
The U.S. patent to Popa et al. (U.S. Pat. No. 6,567,802) discloses a query optimization technique called chase/backchase. The technique is used to systematically optimize queries by generating alternative query plans aimed at multiple disparate targets. Popa's technique deals with query rewrite and does not address the issue of how to select a materialized view from multiple matches to a given query.
Oracle's paper entitled, “Materialized Views in Oracle,” published in Proceedings of the 24th VLDB Conference New York, USA, 1998, pages 659–664, discloses a selection process that belongs to the abovementioned third approach.
Whatever the precise merits, features, and advantages of the above cited references, none of them achieves or fulfills the purposes of the present invention.